#pragma  once
#include "frame_common.h"
#include "RealStreamSource.h"

using namespace FrameCommon;

namespace Media {
    class CDeviceMediaChannel : public MediaChannel {
    public:
        CDeviceMediaChannel(int video, int audio);

        bool Start(void *call_this, frame_callback_func callback) override;

        bool Stop() override;

        bool SetIFrame() override;

        bool GetVideoFormat(VideoFormat &format) override;

        ~CDeviceMediaChannel() override;

    private:
        void *m_call_this = nullptr;
        RealStreamSource::Ptr m_source_ptr;
    };


    class CDeviceMediaChannelEx : public MediaChannel, public std::enable_shared_from_this<CDeviceMediaChannelEx> {
    public:
        explicit CDeviceMediaChannelEx(int scenesId);

        bool Start(void *call_this, frame_callback_func callback) override;

        bool Stop() override;

        bool SetIFrame() override;

        bool GetVideoFormat(VideoFormat &format) override;

        ~CDeviceMediaChannelEx() override;

    private:
        void *m_call_this = nullptr;
        int m_scenesId;
    };
}